<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
  <style>
     div{
	    width:100px;
		height:100px;
		border:solid 1px black;
	 }
  </style> 
  <script src="jQuery复习/jquery-3.3.1.js"></script>
 </head>
 <body>
    <button>div:visible</button> <button>div:hidden</button>
    <div></div>
	<div style="display:none"></div>
 </body>
 <script>
     $("button:first").click(function(){
	     //查找所有显示的div元素
		 $("div:visible").css({"backgroundColor":"yellow"});
	 });
	 $("button:last").click(function(){
	     //查找所有隐藏的div元素
		 $("div:hidden").css({"backgroundColor":"red"}).show(1000);
	 });
 </script>
</html>
